
Public Class frmEmployee


    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents txtmobile As System.Windows.Forms.TextBox
    Friend WithEvents txtRemarks As System.Windows.Forms.TextBox
    Friend WithEvents txtEmpName As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents LstBoxEmployee As System.Windows.Forms.ListBox
    Friend WithEvents txtCode As System.Windows.Forms.TextBox
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents chkstatus As System.Windows.Forms.CheckBox
    Friend WithEvents txtemail As System.Windows.Forms.TextBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents txtCivilId As System.Windows.Forms.TextBox
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents Label17 As System.Windows.Forms.Label
    Friend WithEvents txtEmpNo As System.Windows.Forms.TextBox
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents Label19 As System.Windows.Forms.Label
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents Label21 As System.Windows.Forms.Label
    Friend WithEvents Label26 As System.Windows.Forms.Label
    Friend WithEvents Label25 As System.Windows.Forms.Label
    Friend WithEvents Label24 As System.Windows.Forms.Label
    Friend WithEvents Label23 As System.Windows.Forms.Label
    Friend WithEvents Label22 As System.Windows.Forms.Label
    Friend WithEvents txtAcNo As System.Windows.Forms.TextBox
    Friend WithEvents Label28 As System.Windows.Forms.Label
    Friend WithEvents Label27 As System.Windows.Forms.Label
    Friend WithEvents Label30 As System.Windows.Forms.Label
    Friend WithEvents Label29 As System.Windows.Forms.Label
    Friend WithEvents dtpDob As System.Windows.Forms.DateTimePicker
    Friend WithEvents dtpApp As System.Windows.Forms.DateTimePicker
    Friend WithEvents Label32 As System.Windows.Forms.Label
    Friend WithEvents GroupPanel1 As DevComponents.DotNetBar.Controls.GroupPanel
    Friend WithEvents cmdSave As DevComponents.DotNetBar.ButtonX
    Friend WithEvents cmdExit As DevComponents.DotNetBar.ButtonX
    Friend WithEvents cmbCompany As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbArea As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbQualificaion As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbNationality As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbDesig As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbBank As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbType As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents Label31 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.GroupBox1 = New System.Windows.Forms.GroupBox()
        Me.cmdSave = New DevComponents.DotNetBar.ButtonX()
        Me.cmdExit = New DevComponents.DotNetBar.ButtonX()
        Me.dtpDob = New System.Windows.Forms.DateTimePicker()
        Me.dtpApp = New System.Windows.Forms.DateTimePicker()
        Me.txtAcNo = New System.Windows.Forms.TextBox()
        Me.txtmobile = New System.Windows.Forms.TextBox()
        Me.txtEmpNo = New System.Windows.Forms.TextBox()
        Me.txtCode = New System.Windows.Forms.TextBox()
        Me.txtEmpName = New System.Windows.Forms.TextBox()
        Me.txtCivilId = New System.Windows.Forms.TextBox()
        Me.chkstatus = New System.Windows.Forms.CheckBox()
        Me.txtemail = New System.Windows.Forms.TextBox()
        Me.Label14 = New System.Windows.Forms.Label()
        Me.Label28 = New System.Windows.Forms.Label()
        Me.Label21 = New System.Windows.Forms.Label()
        Me.Label12 = New System.Windows.Forms.Label()
        Me.Label30 = New System.Windows.Forms.Label()
        Me.Label11 = New System.Windows.Forms.Label()
        Me.Label26 = New System.Windows.Forms.Label()
        Me.Label25 = New System.Windows.Forms.Label()
        Me.Label24 = New System.Windows.Forms.Label()
        Me.Label32 = New System.Windows.Forms.Label()
        Me.Label23 = New System.Windows.Forms.Label()
        Me.Label22 = New System.Windows.Forms.Label()
        Me.Label10 = New System.Windows.Forms.Label()
        Me.Label8 = New System.Windows.Forms.Label()
        Me.Label29 = New System.Windows.Forms.Label()
        Me.Label16 = New System.Windows.Forms.Label()
        Me.Label20 = New System.Windows.Forms.Label()
        Me.txtRemarks = New System.Windows.Forms.TextBox()
        Me.Label27 = New System.Windows.Forms.Label()
        Me.Label19 = New System.Windows.Forms.Label()
        Me.Label4 = New System.Windows.Forms.Label()
        Me.Label15 = New System.Windows.Forms.Label()
        Me.Label13 = New System.Windows.Forms.Label()
        Me.Label18 = New System.Windows.Forms.Label()
        Me.Label7 = New System.Windows.Forms.Label()
        Me.Label31 = New System.Windows.Forms.Label()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.Label6 = New System.Windows.Forms.Label()
        Me.Label5 = New System.Windows.Forms.Label()
        Me.Label2 = New System.Windows.Forms.Label()
        Me.Label17 = New System.Windows.Forms.Label()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.LstBoxEmployee = New System.Windows.Forms.ListBox()
        Me.GroupPanel1 = New DevComponents.DotNetBar.Controls.GroupPanel()
        Me.cmbCompany = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbType = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbBank = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbDesig = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbNationality = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbQualificaion = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbArea = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.GroupBox1.SuspendLayout()
        Me.GroupPanel1.SuspendLayout()
        Me.SuspendLayout()
        '
        'GroupBox1
        '
        Me.GroupBox1.BackColor = System.Drawing.Color.Transparent
        Me.GroupBox1.Controls.Add(Me.cmbArea)
        Me.GroupBox1.Controls.Add(Me.cmbQualificaion)
        Me.GroupBox1.Controls.Add(Me.cmbNationality)
        Me.GroupBox1.Controls.Add(Me.cmbDesig)
        Me.GroupBox1.Controls.Add(Me.cmbBank)
        Me.GroupBox1.Controls.Add(Me.cmbType)
        Me.GroupBox1.Controls.Add(Me.cmbCompany)
        Me.GroupBox1.Controls.Add(Me.cmdSave)
        Me.GroupBox1.Controls.Add(Me.cmdExit)
        Me.GroupBox1.Controls.Add(Me.dtpDob)
        Me.GroupBox1.Controls.Add(Me.dtpApp)
        Me.GroupBox1.Controls.Add(Me.txtAcNo)
        Me.GroupBox1.Controls.Add(Me.txtmobile)
        Me.GroupBox1.Controls.Add(Me.txtEmpNo)
        Me.GroupBox1.Controls.Add(Me.txtCode)
        Me.GroupBox1.Controls.Add(Me.txtEmpName)
        Me.GroupBox1.Controls.Add(Me.txtCivilId)
        Me.GroupBox1.Controls.Add(Me.chkstatus)
        Me.GroupBox1.Controls.Add(Me.txtemail)
        Me.GroupBox1.Controls.Add(Me.Label14)
        Me.GroupBox1.Controls.Add(Me.Label28)
        Me.GroupBox1.Controls.Add(Me.Label21)
        Me.GroupBox1.Controls.Add(Me.Label12)
        Me.GroupBox1.Controls.Add(Me.Label30)
        Me.GroupBox1.Controls.Add(Me.Label11)
        Me.GroupBox1.Controls.Add(Me.Label26)
        Me.GroupBox1.Controls.Add(Me.Label25)
        Me.GroupBox1.Controls.Add(Me.Label24)
        Me.GroupBox1.Controls.Add(Me.Label32)
        Me.GroupBox1.Controls.Add(Me.Label23)
        Me.GroupBox1.Controls.Add(Me.Label22)
        Me.GroupBox1.Controls.Add(Me.Label10)
        Me.GroupBox1.Controls.Add(Me.Label8)
        Me.GroupBox1.Controls.Add(Me.Label29)
        Me.GroupBox1.Controls.Add(Me.Label16)
        Me.GroupBox1.Controls.Add(Me.Label20)
        Me.GroupBox1.Controls.Add(Me.txtRemarks)
        Me.GroupBox1.Controls.Add(Me.Label27)
        Me.GroupBox1.Controls.Add(Me.Label19)
        Me.GroupBox1.Controls.Add(Me.Label4)
        Me.GroupBox1.Controls.Add(Me.Label15)
        Me.GroupBox1.Controls.Add(Me.Label13)
        Me.GroupBox1.Controls.Add(Me.Label18)
        Me.GroupBox1.Controls.Add(Me.Label7)
        Me.GroupBox1.Controls.Add(Me.Label31)
        Me.GroupBox1.Controls.Add(Me.Label3)
        Me.GroupBox1.Controls.Add(Me.Label6)
        Me.GroupBox1.Controls.Add(Me.Label5)
        Me.GroupBox1.Controls.Add(Me.Label2)
        Me.GroupBox1.Controls.Add(Me.Label17)
        Me.GroupBox1.Controls.Add(Me.Label1)
        Me.GroupBox1.Controls.Add(Me.LstBoxEmployee)
        Me.GroupBox1.Location = New System.Drawing.Point(3, 2)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(688, 499)
        Me.GroupBox1.TabIndex = 3
        Me.GroupBox1.TabStop = False
        '
        'cmdSave
        '
        Me.cmdSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
        Me.cmdSave.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdSave.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer))
        Me.cmdSave.Location = New System.Drawing.Point(508, 454)
        Me.cmdSave.Name = "cmdSave"
        Me.cmdSave.Size = New System.Drawing.Size(82, 27)
        Me.cmdSave.TabIndex = 270
        Me.cmdSave.Text = "Save"
        '
        'cmdExit
        '
        Me.cmdExit.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
        Me.cmdExit.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdExit.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer))
        Me.cmdExit.Location = New System.Drawing.Point(596, 454)
        Me.cmdExit.Name = "cmdExit"
        Me.cmdExit.Size = New System.Drawing.Size(82, 27)
        Me.cmdExit.TabIndex = 269
        Me.cmdExit.Text = "Exit"
        '
        'dtpDob
        '
        Me.dtpDob.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.dtpDob.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
        Me.dtpDob.Location = New System.Drawing.Point(362, 299)
        Me.dtpDob.Name = "dtpDob"
        Me.dtpDob.Size = New System.Drawing.Size(100, 26)
        Me.dtpDob.TabIndex = 21
        '
        'dtpApp
        '
        Me.dtpApp.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.dtpApp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
        Me.dtpApp.Location = New System.Drawing.Point(248, 298)
        Me.dtpApp.Name = "dtpApp"
        Me.dtpApp.Size = New System.Drawing.Size(105, 26)
        Me.dtpApp.TabIndex = 21
        '
        'txtAcNo
        '
        Me.txtAcNo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtAcNo.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtAcNo.Location = New System.Drawing.Point(12, 352)
        Me.txtAcNo.MaxLength = 24
        Me.txtAcNo.Name = "txtAcNo"
        Me.txtAcNo.Size = New System.Drawing.Size(216, 26)
        Me.txtAcNo.TabIndex = 9
        '
        'txtmobile
        '
        Me.txtmobile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtmobile.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtmobile.Location = New System.Drawing.Point(246, 89)
        Me.txtmobile.MaxLength = 15
        Me.txtmobile.Name = "txtmobile"
        Me.txtmobile.Size = New System.Drawing.Size(216, 26)
        Me.txtmobile.TabIndex = 9
        '
        'txtEmpNo
        '
        Me.txtEmpNo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtEmpNo.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtEmpNo.Location = New System.Drawing.Point(12, 191)
        Me.txtEmpNo.MaxLength = 20
        Me.txtEmpNo.Name = "txtEmpNo"
        Me.txtEmpNo.Size = New System.Drawing.Size(216, 26)
        Me.txtEmpNo.TabIndex = 1
        '
        'txtCode
        '
        Me.txtCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtCode.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtCode.Location = New System.Drawing.Point(12, 140)
        Me.txtCode.MaxLength = 20
        Me.txtCode.Name = "txtCode"
        Me.txtCode.Size = New System.Drawing.Size(216, 26)
        Me.txtCode.TabIndex = 1
        '
        'txtEmpName
        '
        Me.txtEmpName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtEmpName.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtEmpName.Location = New System.Drawing.Point(12, 89)
        Me.txtEmpName.MaxLength = 150
        Me.txtEmpName.Name = "txtEmpName"
        Me.txtEmpName.Size = New System.Drawing.Size(216, 26)
        Me.txtEmpName.TabIndex = 0
        '
        'txtCivilId
        '
        Me.txtCivilId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtCivilId.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtCivilId.Location = New System.Drawing.Point(246, 140)
        Me.txtCivilId.MaxLength = 30
        Me.txtCivilId.Name = "txtCivilId"
        Me.txtCivilId.Size = New System.Drawing.Size(216, 26)
        Me.txtCivilId.TabIndex = 10
        '
        'chkstatus
        '
        Me.chkstatus.AutoSize = True
        Me.chkstatus.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.chkstatus.Location = New System.Drawing.Point(480, 396)
        Me.chkstatus.Name = "chkstatus"
        Me.chkstatus.Size = New System.Drawing.Size(138, 22)
        Me.chkstatus.TabIndex = 11
        Me.chkstatus.Text = "Disable Employee"
        '
        'txtemail
        '
        Me.txtemail.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtemail.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtemail.Location = New System.Drawing.Point(246, 246)
        Me.txtemail.MaxLength = 100
        Me.txtemail.Name = "txtemail"
        Me.txtemail.Size = New System.Drawing.Size(216, 26)
        Me.txtemail.TabIndex = 6
        '
        'Label14
        '
        Me.Label14.AutoSize = True
        Me.Label14.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label14.ForeColor = System.Drawing.Color.Red
        Me.Label14.Location = New System.Drawing.Point(103, 173)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(15, 18)
        Me.Label14.TabIndex = 19
        Me.Label14.Text = "*"
        '
        'Label28
        '
        Me.Label28.AutoSize = True
        Me.Label28.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label28.ForeColor = System.Drawing.Color.Red
        Me.Label28.Location = New System.Drawing.Point(103, 333)
        Me.Label28.Name = "Label28"
        Me.Label28.Size = New System.Drawing.Size(15, 18)
        Me.Label28.TabIndex = 19
        Me.Label28.Text = "*"
        '
        'Label21
        '
        Me.Label21.AutoSize = True
        Me.Label21.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label21.ForeColor = System.Drawing.Color.Red
        Me.Label21.Location = New System.Drawing.Point(335, 121)
        Me.Label21.Name = "Label21"
        Me.Label21.Size = New System.Drawing.Size(15, 18)
        Me.Label21.TabIndex = 19
        Me.Label21.Text = "*"
        '
        'Label12
        '
        Me.Label12.AutoSize = True
        Me.Label12.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label12.ForeColor = System.Drawing.Color.Red
        Me.Label12.Location = New System.Drawing.Point(349, 70)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(15, 18)
        Me.Label12.TabIndex = 19
        Me.Label12.Text = "*"
        '
        'Label30
        '
        Me.Label30.AutoSize = True
        Me.Label30.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label30.ForeColor = System.Drawing.Color.Red
        Me.Label30.Location = New System.Drawing.Point(302, 173)
        Me.Label30.Name = "Label30"
        Me.Label30.Size = New System.Drawing.Size(15, 18)
        Me.Label30.TabIndex = 19
        Me.Label30.Text = "*"
        '
        'Label11
        '
        Me.Label11.AutoSize = True
        Me.Label11.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label11.ForeColor = System.Drawing.Color.Red
        Me.Label11.Location = New System.Drawing.Point(136, 121)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(15, 18)
        Me.Label11.TabIndex = 19
        Me.Label11.Text = "*"
        '
        'Label26
        '
        Me.Label26.AutoSize = True
        Me.Label26.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label26.ForeColor = System.Drawing.Color.Red
        Me.Label26.Location = New System.Drawing.Point(353, 22)
        Me.Label26.Name = "Label26"
        Me.Label26.Size = New System.Drawing.Size(15, 18)
        Me.Label26.TabIndex = 19
        Me.Label26.Text = "*"
        '
        'Label25
        '
        Me.Label25.AutoSize = True
        Me.Label25.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label25.ForeColor = System.Drawing.Color.Red
        Me.Label25.Location = New System.Drawing.Point(99, 435)
        Me.Label25.Name = "Label25"
        Me.Label25.Size = New System.Drawing.Size(15, 18)
        Me.Label25.TabIndex = 19
        Me.Label25.Text = "*"
        '
        'Label24
        '
        Me.Label24.AutoSize = True
        Me.Label24.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label24.ForeColor = System.Drawing.Color.Red
        Me.Label24.Location = New System.Drawing.Point(106, 382)
        Me.Label24.Name = "Label24"
        Me.Label24.Size = New System.Drawing.Size(15, 18)
        Me.Label24.TabIndex = 19
        Me.Label24.Text = "*"
        '
        'Label32
        '
        Me.Label32.AutoSize = True
        Me.Label32.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label32.ForeColor = System.Drawing.Color.Red
        Me.Label32.Location = New System.Drawing.Point(115, 20)
        Me.Label32.Name = "Label32"
        Me.Label32.Size = New System.Drawing.Size(15, 18)
        Me.Label32.TabIndex = 19
        Me.Label32.Text = "*"
        '
        'Label23
        '
        Me.Label23.AutoSize = True
        Me.Label23.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label23.ForeColor = System.Drawing.Color.Red
        Me.Label23.Location = New System.Drawing.Point(136, 279)
        Me.Label23.Name = "Label23"
        Me.Label23.Size = New System.Drawing.Size(15, 18)
        Me.Label23.TabIndex = 19
        Me.Label23.Text = "*"
        '
        'Label22
        '
        Me.Label22.AutoSize = True
        Me.Label22.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label22.ForeColor = System.Drawing.Color.Red
        Me.Label22.Location = New System.Drawing.Point(136, 225)
        Me.Label22.Name = "Label22"
        Me.Label22.Size = New System.Drawing.Size(15, 18)
        Me.Label22.TabIndex = 19
        Me.Label22.Text = "*"
        '
        'Label10
        '
        Me.Label10.AutoSize = True
        Me.Label10.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label10.ForeColor = System.Drawing.Color.Red
        Me.Label10.Location = New System.Drawing.Point(136, 70)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(15, 18)
        Me.Label10.TabIndex = 19
        Me.Label10.Text = "*"
        '
        'Label8
        '
        Me.Label8.AutoSize = True
        Me.Label8.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label8.Location = New System.Drawing.Point(247, 225)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(47, 18)
        Me.Label8.TabIndex = 19
        Me.Label8.Text = "E-mail"
        '
        'Label29
        '
        Me.Label29.AutoSize = True
        Me.Label29.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label29.Location = New System.Drawing.Point(247, 173)
        Me.Label29.Name = "Label29"
        Me.Label29.Size = New System.Drawing.Size(37, 18)
        Me.Label29.TabIndex = 16
        Me.Label29.Text = "Area"
        '
        'Label16
        '
        Me.Label16.AutoSize = True
        Me.Label16.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label16.Location = New System.Drawing.Point(246, 121)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(71, 18)
        Me.Label16.TabIndex = 19
        Me.Label16.Text = "Civil Id No"
        '
        'Label20
        '
        Me.Label20.AutoSize = True
        Me.Label20.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label20.Location = New System.Drawing.Point(246, 19)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(86, 18)
        Me.Label20.TabIndex = 16
        Me.Label20.Text = "Qualification"
        '
        'txtRemarks
        '
        Me.txtRemarks.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtRemarks.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtRemarks.Location = New System.Drawing.Point(246, 354)
        Me.txtRemarks.MaxLength = 500
        Me.txtRemarks.Multiline = True
        Me.txtRemarks.Name = "txtRemarks"
        Me.txtRemarks.Size = New System.Drawing.Size(216, 64)
        Me.txtRemarks.TabIndex = 5
        '
        'Label27
        '
        Me.Label27.AutoSize = True
        Me.Label27.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label27.Location = New System.Drawing.Point(17, 331)
        Me.Label27.Name = "Label27"
        Me.Label27.Size = New System.Drawing.Size(79, 18)
        Me.Label27.TabIndex = 19
        Me.Label27.Text = "Account No"
        '
        'Label19
        '
        Me.Label19.AutoSize = True
        Me.Label19.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label19.Location = New System.Drawing.Point(17, 435)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(76, 18)
        Me.Label19.TabIndex = 16
        Me.Label19.Text = "Nationality"
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label4.Location = New System.Drawing.Point(245, 70)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(70, 18)
        Me.Label4.TabIndex = 19
        Me.Label4.Text = "MobileNo"
        '
        'Label15
        '
        Me.Label15.AutoSize = True
        Me.Label15.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label15.Location = New System.Drawing.Point(18, 383)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(81, 18)
        Me.Label15.TabIndex = 16
        Me.Label15.Text = "Designation"
        '
        'Label13
        '
        Me.Label13.AutoSize = True
        Me.Label13.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label13.Location = New System.Drawing.Point(16, 171)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(72, 18)
        Me.Label13.TabIndex = 16
        Me.Label13.Text = "Payroll No"
        '
        'Label18
        '
        Me.Label18.AutoSize = True
        Me.Label18.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label18.Location = New System.Drawing.Point(359, 278)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(100, 18)
        Me.Label18.TabIndex = 18
        Me.Label18.Text = "Employee DOB"
        '
        'Label7
        '
        Me.Label7.AutoSize = True
        Me.Label7.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label7.Location = New System.Drawing.Point(15, 279)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(103, 18)
        Me.Label7.TabIndex = 16
        Me.Label7.Text = "Employee Bank"
        '
        'Label31
        '
        Me.Label31.AutoSize = True
        Me.Label31.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label31.Location = New System.Drawing.Point(16, 20)
        Me.Label31.Name = "Label31"
        Me.Label31.Size = New System.Drawing.Size(66, 18)
        Me.Label31.TabIndex = 16
        Me.Label31.Text = "Company"
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label3.Location = New System.Drawing.Point(245, 278)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(79, 18)
        Me.Label3.TabIndex = 18
        Me.Label3.Text = "Appnt.Date"
        '
        'Label6
        '
        Me.Label6.AutoSize = True
        Me.Label6.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label6.Location = New System.Drawing.Point(16, 225)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(102, 18)
        Me.Label6.TabIndex = 16
        Me.Label6.Text = "Employee Type"
        '
        'Label5
        '
        Me.Label5.AutoSize = True
        Me.Label5.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label5.Location = New System.Drawing.Point(16, 121)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(105, 18)
        Me.Label5.TabIndex = 16
        Me.Label5.Text = "Employee Code"
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label2.Location = New System.Drawing.Point(247, 333)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(117, 18)
        Me.Label2.TabIndex = 17
        Me.Label2.Text = "Address/Remarks"
        '
        'Label17
        '
        Me.Label17.AutoSize = True
        Me.Label17.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label17.Location = New System.Drawing.Point(477, 19)
        Me.Label17.Name = "Label17"
        Me.Label17.Size = New System.Drawing.Size(41, 18)
        Me.Label17.TabIndex = 16
        Me.Label17.Text = "Label"
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.Location = New System.Drawing.Point(17, 70)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(113, 18)
        Me.Label1.TabIndex = 16
        Me.Label1.Text = "Employee Name "
        '
        'LstBoxEmployee
        '
        Me.LstBoxEmployee.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.LstBoxEmployee.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LstBoxEmployee.ItemHeight = 18
        Me.LstBoxEmployee.Location = New System.Drawing.Point(478, 38)
        Me.LstBoxEmployee.Name = "LstBoxEmployee"
        Me.LstBoxEmployee.Size = New System.Drawing.Size(200, 344)
        Me.LstBoxEmployee.TabIndex = 13
        '
        'GroupPanel1
        '
        Me.GroupPanel1.CanvasColor = System.Drawing.SystemColors.Control
        Me.GroupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007
        Me.GroupPanel1.Controls.Add(Me.GroupBox1)
        Me.GroupPanel1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.GroupPanel1.Location = New System.Drawing.Point(0, 0)
        Me.GroupPanel1.Name = "GroupPanel1"
        Me.GroupPanel1.Size = New System.Drawing.Size(705, 537)
        '
        '
        '
        Me.GroupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2
        Me.GroupPanel1.Style.BackColorGradientAngle = 90
        Me.GroupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground
        Me.GroupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderBottomWidth = 1
        Me.GroupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder
        Me.GroupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderLeftWidth = 1
        Me.GroupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderRightWidth = 1
        Me.GroupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderTopWidth = 1
        Me.GroupPanel1.Style.CornerDiameter = 4
        Me.GroupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded
        Me.GroupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center
        Me.GroupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText
        Me.GroupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near
        Me.GroupPanel1.TabIndex = 25
        Me.GroupPanel1.Text = "Create Employee"
        '
        'cmbCompany
        '
        Me.cmbCompany.DisplayMember = "Text"
        Me.cmbCompany.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbCompany.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbCompany.Location = New System.Drawing.Point(12, 41)
        Me.cmbCompany.Name = "cmbCompany"
        Me.cmbCompany.Size = New System.Drawing.Size(216, 27)
        Me.cmbCompany.TabIndex = 271
        '
        'cmbType
        '
        Me.cmbType.DisplayMember = "Text"
        Me.cmbType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbType.Location = New System.Drawing.Point(12, 246)
        Me.cmbType.Name = "cmbType"
        Me.cmbType.Size = New System.Drawing.Size(216, 27)
        Me.cmbType.TabIndex = 271
        '
        'cmbBank
        '
        Me.cmbBank.DisplayMember = "Text"
        Me.cmbBank.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbBank.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbBank.Location = New System.Drawing.Point(12, 301)
        Me.cmbBank.Name = "cmbBank"
        Me.cmbBank.Size = New System.Drawing.Size(216, 27)
        Me.cmbBank.TabIndex = 271
        '
        'cmbDesig
        '
        Me.cmbDesig.DisplayMember = "Text"
        Me.cmbDesig.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbDesig.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbDesig.Location = New System.Drawing.Point(12, 404)
        Me.cmbDesig.Name = "cmbDesig"
        Me.cmbDesig.Size = New System.Drawing.Size(216, 27)
        Me.cmbDesig.TabIndex = 271
        '
        'cmbNationality
        '
        Me.cmbNationality.DisplayMember = "Text"
        Me.cmbNationality.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbNationality.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbNationality.Location = New System.Drawing.Point(12, 456)
        Me.cmbNationality.Name = "cmbNationality"
        Me.cmbNationality.Size = New System.Drawing.Size(216, 27)
        Me.cmbNationality.TabIndex = 271
        '
        'cmbQualificaion
        '
        Me.cmbQualificaion.DisplayMember = "Text"
        Me.cmbQualificaion.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbQualificaion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbQualificaion.Location = New System.Drawing.Point(246, 40)
        Me.cmbQualificaion.Name = "cmbQualificaion"
        Me.cmbQualificaion.Size = New System.Drawing.Size(216, 27)
        Me.cmbQualificaion.TabIndex = 271
        '
        'cmbArea
        '
        Me.cmbArea.DisplayMember = "Text"
        Me.cmbArea.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbArea.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbArea.Location = New System.Drawing.Point(246, 193)
        Me.cmbArea.Name = "cmbArea"
        Me.cmbArea.Size = New System.Drawing.Size(216, 27)
        Me.cmbArea.TabIndex = 271
        '
        'frmEmployee
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(7, 19)
        Me.BackColor = System.Drawing.Color.WhiteSmoke
        Me.ClientSize = New System.Drawing.Size(705, 537)
        Me.ControlBox = False
        Me.Controls.Add(Me.GroupPanel1)
        Me.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
        Me.Location = New System.Drawing.Point(152, 120)
        Me.Name = "frmEmployee"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.GroupBox1.ResumeLayout(False)
        Me.GroupBox1.PerformLayout()
        Me.GroupPanel1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region
    Dim dml_ddl As New DmlDdl
    Dim SQLDreader As SqlClient.SqlDataReader

    Dim EmployeeId As Integer 'for updation


    Private Sub LoadEmployeeType()
        cmbType.Items.Clear()
        Try
            SQLDreader = dml_ddl.LoadName("LoadEmployeeType")
            While SQLDreader.Read
                cmbType.Items.Add(SQLDreader("EmpTypeName"))
            End While
            SQLDreader.Close()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Gulf Chemicals")
        End Try
    End Sub

    Private Sub LoadEmployeeBank()
        cmbBank.Items.Clear()
        Try
            SQLDreader = dml_ddl.LoadName("LoadBank")
            While SQLDreader.Read
                cmbBank.Items.Add(SQLDreader("BankName"))
            End While
            SQLDreader.Close()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Gulf Chemicals")
        End Try
    End Sub

    Private Sub LoadEmployeeDesignation()
        cmbDesig.Items.Clear()
        Try
            SQLDreader = dml_ddl.LoadName("LoadDesignation")
            While SQLDreader.Read
                cmbDesig.Items.Add(SQLDreader("DesignationName"))
            End While
            SQLDreader.Close()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Gulf Chemicals")
        End Try
    End Sub

    Private Sub LoadNationality()
        cmbNationality.Items.Clear()
        Try
            SQLDreader = dml_ddl.LoadName("LoadNationality")
            While SQLDreader.Read
                cmbNationality.Items.Add(SQLDreader("NationalityName"))
            End While
            SQLDreader.Close()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Gulf Chemicals")
        End Try
    End Sub

    Private Sub LoadQualification()
        cmbQualificaion.Items.Clear()
        Try
            SQLDreader = dml_ddl.LoadName("LoadEmployeeQualification")
            While SQLDreader.Read
                cmbQualificaion.Items.Add(SQLDreader("Qualification"))
            End While
            SQLDreader.Close()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Gulf Chemicals")
        End Try
    End Sub

    Private Sub LoadArea()
        cmbArea.Items.Clear()
        Try
            SQLDreader = dml_ddl.LoadName("LoadArea")
            While SQLDreader.Read
                cmbArea.Items.Add(SQLDreader("AreaName"))
            End While
            SQLDreader.Close()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Gulf Chemicals")
        End Try
    End Sub
    Sub toLoadCompany()
        Dim ARdata As New ARdataLogic
        Dim ds As DataSet
        ds = ARdata.GetAllCompany()
        cmbCompany.DataSource = ds.Tables(0)
        cmbCompany.ValueMember = "CompanyID"
        cmbCompany.DisplayMember = "CompanyName"

    End Sub
    Private Sub LoadAllEmployee()
        LstBoxEmployee.Items.Clear()
        Try
            SQLDreader = dml_ddl.LoadAllEmployee(cmbCompany.SelectedValue)
            While SQLDreader.Read
                LstBoxEmployee.Items.Add(SQLDreader("EmpName"))
            End While
            SQLDreader.Close()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Gulf Chemicals")
        End Try
    End Sub

    Private Sub frmSupplier_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Location = New Point(30, 150)
        Call toLoadCompany()
        Call LoadArea()
        Call LoadEmployeeBank()
        Call LoadEmployeeDesignation()
        Call LoadEmployeeType()
        Call LoadNationality()
        Call LoadQualification()
        Call LoadAllEmployee()
        Call toInit()
        LstBoxEmployee.BringToFront()
    End Sub
    Sub toInit()
        cmbArea.SelectedIndex = 0
        cmbBank.SelectedIndex = 0
        cmbDesig.SelectedIndex = 0
        cmbNationality.SelectedIndex = 0
        cmbQualificaion.SelectedIndex = 0
        cmbType.SelectedIndex = 0
    End Sub
    Sub LoadEmployeeDetails()
        Try
            Dim dr As SqlClient.SqlDataReader
            dr = dml_ddl.LoadEmployeeDetails("LoadEmployeeDetails", cmbCompany.SelectedValue, txtEmpName.Text.Trim)
            While dr.Read

                EmployeeId = dr("EmpId")
                txtEmpName.Text = dr("EmpName")

                txtCode.Text = dr("EmpCode")
                txtEmpNo.Text = dr("EmpNo")

                cmbType.Text = dr("EmpTypeName")
                cmbBank.Text = dr("BankName")

                txtAcNo.Text = dr("AccNo")
                cmbDesig.Text = dr("DesignationName")

                cmbNationality.Text = dr("NationalityName")
                cmbQualificaion.Text = dr("Qualification")

                txtmobile.Text = dr("MobNo")
                txtCivilId.Text = dr("CivilId")

                cmbArea.Text = dr("AreaName")
                txtemail.Text = dr("Email")

                dtpApp.Text = dr("AppoDate")
                dtpDob.Text = dr("DOB")
                txtRemarks.Text = dr("Remarks")

                cmbCompany.SelectedItem = dr("CompanyName")

                If dr("IsActive") = 0 Then
                    chkstatus.Checked = True
                Else
                    chkstatus.Checked = False
                End If

            End While
            dr.Close()
            cmdsave.Text = "&Update"
            cmdExit.Text = "&Cancel"
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Information, "Gulf Chemicals")
        End Try
    End Sub

    Sub Clear()
        txtEmpName.Clear()
        txtCode.Text = ""
        txtEmpNo.Text = ""
        txtAcNo.Text = ""
        txtemail.Text = ""
        txtmobile.Clear()
        txtCivilId.Clear()
        txtRemarks.Clear()
        chkstatus.Checked = False
        txtEmpName.Focus()
    End Sub

    Function NullValidation() As Boolean
        If txtEmpName.Text = "" Then
            MsgBox("Enter the Employee name", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtEmpName.Focus()
        ElseIf txtCode.Text = "" Then
            MsgBox("Enter the Employee code", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtCode.Focus()
        ElseIf txtEmpNo.Text = "" Then
            MsgBox("Enter the Employee PayRollNo", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtEmpNo.Focus()
        ElseIf txtmobile.Text = "" Then
            MsgBox("Enter the Employee Mobile", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtmobile.Focus()
        ElseIf txtCivilId.Text = "" Then
            MsgBox("Enter the Employee CivilId No", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtCivilId.Focus()
        ElseIf txtAcNo.Text = "" Then
            MsgBox("Enter the Employee Account No", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtAcNo.Focus()

        ElseIf dml_ddl.CheckIfExist("IfEmployeeExist", txtEmpName.Text.Trim, 0) = True And EmployeeId = 0 Then
            MsgBox("Employee already exist", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtEmpName.Focus()

        ElseIf dml_ddl.CheckIfExist("IfEmployeeExist", txtCode.Text.Trim, 1) = True And EmployeeId = 0 Then
            MsgBox("Employee code already exist", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtCode.Focus()
        ElseIf dml_ddl.CheckIfExist("IfEmployeeExist", txtEmpNo.Text.Trim, 2) = True And EmployeeId = 0 Then
            MsgBox("PayRoll No already exist", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtCode.Focus()
        ElseIf dml_ddl.CheckIfExist("IfEmployeeExist", txtAcNo.Text.Trim, 3) = True And EmployeeId = 0 Then
            MsgBox("Account No already exist", MsgBoxStyle.Information, "Gulf Chemicals")
            NullValidation = True
            txtCode.Focus()
        Else
            NullValidation = False
        End If
    End Function

    Private Sub cmdsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click

        If NullValidation() = True Then Exit Sub
        If cmdSave.Text = "&Save" Then : EmployeeId = 0
        Else
            cmdSave.Text = "&Save"
            cmdExit.Text = "E&xit"
        End If

        Dim active As Integer
        If chkstatus.CheckState = CheckState.Checked Then
            active = 0
        Else
            active = 1
        End If

        Try
            dml_ddl.InsertUpdateEmployee(EmployeeId, txtEmpName.Text.Trim, txtCode.Text.Trim, txtEmpNo.Text.Trim, cmbType.Text, cmbBank.Text, txtAcNo.Text.Trim, cmbDesig.Text, cmbNationality.Text, cmbQualificaion.Text, txtmobile.Text.Trim, txtCivilId.Text.Trim, cmbArea.Text, txtemail.Text.Trim, dtpApp.Text, dtpDob.Text, txtRemarks.Text.Trim, active, cmbCompany.SelectedValue)
            MsgBox("Successfully Completed", MsgBoxStyle.Information, "Gulf Chemicals")
            Call Clear()
            cmdSave.Text = "&Save"
            cmdExit.Text = "E&xit"
            Call LoadAllEmployee()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Gulf Chemicals")
            Call Clear()
            cmdSave.Text = "&Save"
            cmdExit.Text = "E&xit"
        End Try
    End Sub

    Private Sub cmdcancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
        If cmdExit.Text = "E&xit" Then
            Me.Close()
        Else
            cmdSave.Text = "&Save"
            cmdExit.Text = "E&xit"
            Clear()
        End If
    End Sub

    Private Sub txtEmpName_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtEmpName.GotFocus
        LstBoxEmployee.BringToFront()
        Label17.Text = "Supplier List"
    End Sub

    Private Sub txtEmpName_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtEmpName.KeyDown
        dml_ddl.KeyDownEvent(e, txtEmpName, LstBoxEmployee)
        If e.KeyCode = Keys.Enter Then
            LoadEmployeeDetails()
        End If
    End Sub

    Private Sub txtEmpName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEmpName.TextChanged
        dml_ddl.TextChangeEvent(txtEmpName, LstBoxEmployee)
    End Sub

    Private Sub LstBoxEmployee_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles LstBoxEmployee.DoubleClick
        txtEmpName.Text = LstBoxEmployee.SelectedItem
        LoadEmployeeDetails()
    End Sub

   
End Class
